<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>作业管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
		<script type="text/javascript" src="__JS__/jshelper.js"></script> 
<script type="text/JavaScript">
				function workedit(id){
					window.location.href="__URL__/workedit/id/"+id;
				}
				function worksearch(id){
					window.location.href="__URL__/workdetail/id/"+id;
				}
				function workdelete(id,classid,pname,p){
					if (confirm("你确定要删除吗")==true)
						postwith('__URL__/workdelete',{id:id,classid:classid,pname:pname,p:p});
				}
				function filedownload(classid,pname){
					postwith('__URL__/filedownload',{classid:classid,pname:pname});
				}
					window.onload=show;
	</script>
	<script type="text/javascript" src="__JS__/jQuery/jquery.js"></script>
	<script type="text/javascript" src="__JS__/jQuery/jquery.form.js"></script>
	<script type="text/JavaScript">
       $(function(){
           $('#form1').ajaxForm({
               //beforeSubmit:  function(){alert("before");},  // pre-submit callback
               success:       complete,  // post-submit callback
               error:function(){alert("error");},
               dataType: 'json'
           });
           
           function complete(data){
               if (data.status==1)
               {
               	window.location=window.location.href;
               }else{
                   $('#result').html(data.info).show();
               }
           }
       });
       </script>
</head>
<body>
	<!-- layout::Auth:header::0 -->
        	<div class="container-fluid">
     			<div class="row-fluid">
                	<!-- layout::Auth:leftmenu::0 -->
                    	<div class="span8">
                          <div class="hero-unit">
                            <h1>作业管理</h1>
                            <p style="font-size:12px">当前位置：
                                <a href='__APP__/index/index' class="nowpositionhref">主页</a>>
                                <a href='__URL__/index' class="nowpositionhref">后台管理</a>>
                                <a href="" class="nowpositionhref" >作业管理</a>
                             </p>
	</div>
		
					<table width="100%" class="table table-bordered table-striped">
                    	<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><tr>
                            	<td>作业名称</td>
                                <td><a href="__ROOT__<?php echo ($vo["path"]); ?><?php echo ($vo["name"]); ?>" target="_blank"><?php echo ($vo["name"]); ?></a></td>
                            </tr>
                            <tr>
                            	<td>课程序号</td>
                                <td><?php echo ($vo["courseid"]); ?></td>
                            </tr>
                            <tr>
                            	<td>课程名称</td>
                                <td><?php echo ($vo["cname"]); ?></td>
                            </tr>
                            <tr>
                            	<td>任课教师</td>
                                <td><?php echo ($vo["nname"]); ?></td>
                            </tr>
                            <tr>
                            	<td>评语</td>
                                <td><?php echo ($vo["text"]); ?></td>
                            </tr>
                            <tr>
                            	<td>成绩</td>
                                <td><?php echo ($vo["grade"]); ?></td>
                            </tr>
                            <tr>
                            	<td>发表时间</td>
                                <td><?php echo ($vo["time"]); ?></td>
                            </tr>
                            <tr>
                            	<td>操作</td>
                                <td>
                                	<a href="#"  name='delete_work' onClick="workdelete('<?php echo ($vo["id"]); ?>','<?php echo ($vo["classid"]); ?>','<?php echo ($pname); ?>','<?php echo ($p); ?>')" class="btn btn-danger">删除</a>
                                </td>
                                <td style="display:none">ID</td>
                                <td style="display:none"><?php echo ($vo["id"]); ?></td>
                            </tr><?php endforeach; endif; else: echo "" ;endif; ?>
						
					</table>
                    <p class="navbar-text pull-right"><?php echo ($page); ?></p>
				</div>
			</div>
          </div>
</body>
</html>